package com.example.lin.versionadaptation;

import android.os.Build;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        TextView tv = findViewById(R.id.tv);





        int currentVersionCode = Build.VERSION.SDK_INT;
        if (currentVersionCode>=Build.VERSION_CODES.M){
            tv.setTextSize(80);
        }
//        if (currentVersionCode>=Build.VERSION_CODES.O_MR1){
//            tv.setTextSize(160);
//        }


    }



}
